//
//  CZUserAccount.swift
//  WH01
//
//  Created by Apple on 16/7/8.
//  Copyright © 2016年 KY. All rights reserved.
//

import UIKit
//  账号模型
class CZUserAccount: NSObject {
    //  用户授权的唯一票据
    var access_token: String?
    //  access_token的生命周期，单位是秒数
    var expires_in: Int = 0
    //  授权用户的UID
    var uid: Int64 = 0
    //  用户名
    var name: String?
    //  用户头像
    var avatar_large: String?
    
    //  kvc构造函数
    init(dic: [String: AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dic)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
    //  重写NSObjectProtocol的属性
    override var description: String {
        let keys = ["access_token", "expires_in", "uid", "name", "avatar_large"]
        //  对象以字典描述展示
        return dictionaryWithValuesForKeys(keys).description
    }
    
    
    
    
    
    
    
    
    
    
}
